import ajax from '@/utils/request.js'
/**
 * 搜索功能
 */
export const getSearch = keyword => {
  return ajax({
    method: 'GET',
    url: '/app/v1_0/search',
    params: {
      q: keyword
    }
  })
}
/**
 * 搜索建议
 */
export const getSearchSuggestion = keyword => {
  return ajax({
    method: 'GET',
    url: '/app/v1_0/suggestion',
    params: {
      q: keyword
    }
  })
}
/***
 * 获取搜索结果
 */
export const getSearchResult = (keyword, page) => {
  return ajax({
    method: 'GET',
    url: '/app/v1_0/search',
    params: {
      q: keyword,
      page
    }
  })
}
